package com.itheima.sh.user.client;

import com.itheima.sh.pojo.Order;
import com.itheima.sh.user.client.fallback.OrderClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @Description:
 * @Version: V1.0
 */
@FeignClient(value = "order-server", fallback = OrderClientFallback.class)
public interface OrderClient {

    @GetMapping("order/findOrderByUsername")   // ?username=itcast
    public List<Order> findOrderByUsername(@RequestParam("username") String username);

}
